//
// Created by zuo on 2024/6/29.
// 题目链接 https://www.lanqiao.cn/problems/497/learning/?page=1&first_category_id=1&problem_id=497
//

#include <algorithm>    //max_element min_element
#include <iomanip>  // setprecision
#include<iostream>

using namespace std;
const int N = 1e4 + 1;

int main()
{
    // C

    // int arr[N];
    // int n;
    // scanf("%d", &n);
    // double sum = 0;
    // for (int i = 0; i < n; i++)
    // {
    //     scanf("%d", &arr[i]);
    //     sum += arr[i];
    // }
    // int max_score = *max_element(arr, arr + n);
    // int min_score = *min_element(arr, arr + n);
    // double avg_score = sum / n; // 必须有double类型（sum或者n）才能自动转换为double  否则都是int
    // printf("%d\n", max_score);
    // printf("%d\n", min_score);
    // printf("%.2lf\n", avg_score);

    //C++
    int arr[N];
    int n;
    cin >> n;
    double sum = 0;
    for (int i = 0; i < n; i++)
    {
        cin >> arr[i];
        sum += arr[i];
    }
    int max_score = *max_element(arr, arr + n);
    int min_score = *min_element(arr, arr + n);
    double avg_score = sum / n; // 必须有double类型（sum或者n）才能自动转换为double  否则都是int
    cout << max_score << '\n';
    cout << min_score << '\n';
    cout << fixed << setprecision(2) << avg_score << '\n';

    return 0;
}
